<?php
/* @var $this TicketStatusController */
/* @var $model TicketStatus */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'ticket-status-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>



	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->dropDownList($model,'status',array("Open"=>"Open", "Close"=>"Close", "Planning"=>"Planning") 
		,array('empty'=>'Select a Ticket Status')); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>



	<div class="row">
		<?php echo $form->labelEx($model,'start_date'); ?>
		<?php $this-> widget ('zii.widgets.jui.CJuiDatePicker', array(
		'model'=>$model, 'attribute'=>'start_date',
			'options' => array (
			'dateFormat' => 'yy-mm-dd',
				'yearRange' => '-20:+20',
					'changeYear' => 'true',
						'changeMonth' => 'true',
					),
						));
					?>
		<?php echo $form->error($model,'start_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'start_time'); ?>
		<?php $this->widget('ext.timepicker.timepicker',array(
              'name' => 'start_time',
              'model'=>$model,
             'language'=>'en',
                'options' =>array (
                   'timeFormat'=>'hh:mm:ss',
                 'showSecond'=>true,
                 'hourGrid'=>4,
               'minuteGrid'=>10,
			          'secondGrid'=>10,
			   
),
)); ?>
		<?php echo $form->error($model,'start_time'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'stop_date'); ?>
		<?php $this-> widget ('zii.widgets.jui.CJuiDatePicker', array(
		'model'=>$model, 'attribute'=>'stop_date',
			'options' => array (
			'dateFormat' => 'yy-mm-dd',
				'yearRange' => '-20:+20',
					'changeYear' => 'true',
						'changeMonth' => 'true',
					),
						));
					?>
		<?php echo $form->error($model,'stop_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'stop_time'); ?>
		<?php $this->widget('ext.timepicker.timepicker',array(
              'name' => 'stop_time',
              'model'=>$model,
             'language'=>'en',
                'options' =>array (
                   'timeFormat'=>'hh:mm:ss',
                 'showSecond'=>true,
                 'hourGrid'=>4,
               'minuteGrid'=>10,
			          'secondGrid'=>10,
			   
),
)); ?>
		<?php echo $form->error($model,'stop_time'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'report_date'); ?>
		<?php $this-> widget ('zii.widgets.jui.CJuiDatePicker', array(
		'model'=>$model, 'attribute'=>'report_date',
			'options' => array (
			'dateFormat' => 'yy-mm-dd',
				'yearRange' => '-20:+20',
					'changeYear' => 'true',
						'changeMonth' => 'true',
					),
						));
					?>
		<?php echo $form->error($model,'report_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'report_time'); ?>
		<?php $this->widget('ext.timepicker.timepicker',array(
              'name' => 'report_time',
              'model'=>$model,
             'language'=>'en',
                'options' =>array (
                   'timeFormat'=>'hh:mm:ss',
                 'showSecond'=>true,
                 'hourGrid'=>4,
               'minuteGrid'=>10,
			          'secondGrid'=>10,
			   
),
)); ?>
		<?php echo $form->error($model,'report_time'); ?>
	</div>

	
	<?php echo $form->hiddenField($model, 'current_date');?>
		<?php echo $form->error($model,'current_date'); ?>
	
	<?php echo $form->hiddenField($model, 'current_time');?>
		<?php echo $form->error($model,'current_time'); ?>
	

	<div class="row">
		<?php echo $form->labelEx($model,'remarks'); ?>
		<?php echo $form->textArea($model,'remarks',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'remarks'); ?>
	</div>

	
	<div class="row">
	<?php echo $form->labelEx($model,'ticket_id'); ?>
	<?php echo $form->dropDownList ($model, 'ticket_id',
	CHtml::listData(
	Ticket::model()->findAll(),'id','ticket_name'),
	array('prompt' => 'Select a Ticket Name')
	); ?>
	<?php echo $form->error($model,'ticket_id'); ?>
	</div>

	

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
